Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some codegen tests & fixes #15632

Merged
merged 5 commits into from
Mar 28, 2016
Merged

some codegen tests & fixes #15632

merged 5 commits into from
Mar 28, 2016

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Mar 26, 2016

minor fixes and improvements for codegen, and some tests

private:
void NotifyGDB(OwningBinary<ObjectFile> &DebugObj)
{
const char *Buffer = DebugObj.getBinary()->getMemoryBufferRef().getBufferStart();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inconsistent indentation

@Keno
Copy link
Member

Keno commented Mar 26, 2016

LGTM, modulo @tkelman's style complaint.

vtjnash and others added 5 commits March 28, 2016 13:46
without this, code_llvm was showing un-optimized functions
which could be very misleading since it differed from the code that actually executed
(this was a recent regression caused by jn/moduledecoalescing)
CompileLayer.findSymbol is O(n) in the number of modules that have been emitted
but we can pre-compute the result of findSymbolIn when notified that an object has been emitted and store it in one hash table for the JIT

fix #15619
@StefanKarpinski
Copy link
Member

Since this contains a fix for a very annoying issue, I'm merging. Style issues can be fixed up afterwards.

@StefanKarpinski StefanKarpinski merged commit 5c20f76 into master Mar 28, 2016
@StefanKarpinski StefanKarpinski deleted the jn/grabbag4 branch March 28, 2016 22:33
@vtjnash
Copy link
Member Author

vtjnash commented Mar 28, 2016

i fixed the style issue. just forgot to check CI, so you're all set :)

// note: calling getAddress here eagerly finalizes H
// as an alternative, we could store the JITSymbol instead
// (which would present a lazy-initializer functor interface instead)
JIT.LocalSymbolTable[*Name] = (void*)(uintptr_t)Sym.getAddress();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this is the only place we get the symbol address (eagerly) now? It seems that on llvm 39 this is not called before we get to findSymbol (maybe because llvm gets lazier?) and therefore findSymbol returns NULL.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That line is in another lambda?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed. i think there are a few more templated lambdas in that call chain too.

@tkelman
Copy link
Contributor

tkelman commented May 4, 2016

This (specifically 3f4ba52) made #11083/#14626 worse, win32 consistently hits allocation failures when running make testall1 since this was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants